package cn.itsource.pet.controller;

import cn.itsource.pet.domain.PetType;
import cn.itsource.pet.service.PetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("pet/type")
public class PetTypeController {

    @Autowired
    PetTypeService petTypeService;

    @GetMapping("/findAll")
    public List<PetType> findAll(){
       List<PetType> petTypes =  petTypeService.findAll();
       return petTypes;
    }
}
